﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="BCDTNVKD.aspx.cs" Inherits="BCDTNVKD" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>
            <div class="panel panel-success margin">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Báo cáo doanh thu theo nhân viên kinh doanh
                        <asp:DropDownList ID="dlLoaiBaoCao" AutoPostBack="true" runat="server" Width="200px"
                            CssClass="form-control" 
                            onselectedindexchanged="dlLoaiBaoCao_SelectedIndexChanged">
                            <asp:ListItem Text="BCDT tổng hợp"></asp:ListItem>
                            <asp:ListItem Text="BCDT mác hợp đồng"></asp:ListItem>
                            <asp:ListItem Text="BCDT biển số xe"></asp:ListItem>
                            <asp:ListItem Text="BCDT NVKD" Selected="True"></asp:ListItem>
                            <asp:ListItem Text="BCDT xe bơm"></asp:ListItem>
                            <asp:ListItem Text="BCDT giá vật liệu"></asp:ListItem>
                            <asp:ListItem Text="BCDT theo khách hàng"></asp:ListItem>
                            <asp:ListItem Text="BCDT vật liệu tiêu hao"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="btnXem" ValidationGroup="Them" CssClass="btn btn-warning" runat="server" Text="Tìm kiếm"
                            OnClick="btnXem_Click" />
                        <asp:Button ID="btnSave" ValidationGroup="Them" runat="server" Style="margin-left: 5px;"
                            Text="Xuất báo cáo" CssClass="btn btn-primary" OnClick="btnPrint_Click" />
                    </h3>
                </div>
                <div class="panel-body">
                    <div>
                        <asp:DropDownList ID="dlThang" AutoPostBack="true" runat="server" Width="150px" CssClass="form-control"
                            OnSelectedIndexChanged="dlThang_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:DropDownList ID="dlNam" AutoPostBack="true" OnSelectedIndexChanged="dlThang_SelectedIndexChanged"
                            runat="server" Width="110px" CssClass="form-control">
                        </asp:DropDownList>
                        <asp:TextBox ID="txtTuNgay" runat="server" AutoPostBack="true" OnTextChanged="dlThang_SelectedIndexChanged"
                            placeholder="Từ ngày" Visible="true" Width="100px" CssClass="form-control"></asp:TextBox>&nbsp;
                        <asp:TextBox ID="txtDenNgay" runat="server" placeholder="Đến ngày" OnTextChanged="dlThang_SelectedIndexChanged"
                            AutoPostBack="true" Visible="true" Width="100px" CssClass="form-control"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtTuNgay"
                            Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                        <cc1:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtDenNgay"
                            Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" FilterType="Custom,Numbers"
                            TargetControlID="txtTuNgay" ValidChars="/-" />
                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" FilterType="Custom,Numbers"
                            TargetControlID="txtDenNgay" ValidChars="/-" />
                        
                        
                        <asp:DropDownList ID="dlNhanVien" ToolTip="Chọn nhân viên" runat="server" AutoPostBack="true"
                            DataValueField="IDs" Width="250px" CssClass="form-control" 
                            DataTextField="HoTen" 
                            onselectedindexchanged="dlNhanVien_SelectedIndexChanged">
                        </asp:DropDownList>
                        

                        <asp:DropDownList ID="dlHinhThuc" ToolTip="Chọn hình thức hợp đồng" runat="server" CssClass="form-control" Width="250px" DataTextField="TenHinhThuc" DataValueField="TrangThaiCongTrinh">
                        </asp:DropDownList>
                        
                        <asp:HiddenField ID="hdTuNgay" runat="server" />
                        <asp:HiddenField ID="hdDenNgay" runat="server" />
                        <asp:ValidationSummary ID="ValidationSummary1" HeaderText=""
                        ShowMessageBox="true" ValidationGroup="Them" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
                    </div>
                    <div style="width: 100%; margin-top: 0px; overflow-x: auto;" class="wrapper">
                        <asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" BackColor="White"
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="1" EmptyDataText="Không có dữ liệu nào"
                            EnableModelValidation="True" ShowFooter="true" Width="1800px" 
                            CssClass="form-control withall" onrowdatabound="GV_RowDataBound">
                            <Columns>
                                <asp:BoundField DataField="STT" HeaderText="STT" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="NgayXuat" HeaderText="Ngày xuất" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="KhachHang" HeaderText="Khách hàng" ItemStyle-CssClass="paddingleft" />
                                <asp:BoundField DataField="VAT" HeaderText="VAT" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="MacTX" HeaderText="Mác TX" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="KLThucXuat" HeaderText="KL TX" ItemStyle-HorizontalAlign="Center" />

                                <asp:BoundField DataField="MacHD" HeaderText="Mác HĐ" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="KLKhachHang" HeaderText="KL bán" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="LoaiDa" HeaderText="Loại đá" ItemStyle-HorizontalAlign="Center" />
                                
                                <asp:BoundField DataField="GiaHD" HeaderText="Giá HĐ" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                
                                <asp:BoundField DataField="TTGiaHD" HeaderText="TT bê tông" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0,0}" />
                                
                                 <asp:BoundField DataField="ChenhKL" HeaderText="Tổng chênh" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N1}" />
                                <asp:BoundField DataField="KLNVKD" HeaderText="Chênh NVKD" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N1}" />

                                <asp:BoundField DataField="TTChenh" HeaderText="TT chênh" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" />
                                <asp:BoundField DataField="TTNVKD" HeaderText="TT NVKD" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" />

                                <asp:BoundField DataField="TienHoTroCuoc" HeaderText="Tiền hỗ trợ cước" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" />
                                <asp:BoundField DataField="LoaiCaBom" HeaderText="Loại ca bơm" ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="paddingleft" />
                                <asp:BoundField DataField="TienCaBom" HeaderText="Tiền ca bơm" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" />
                                <asp:BoundField DataField="ThanhTienHang" HeaderText="Thành tiền hàng" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" />
                                <asp:BoundField DataField="NVKD" HeaderText="NVKD" ItemStyle-HorizontalAlign="Left" />
                                <asp:BoundField DataField="HinhThuc" HeaderText="Hình thức HĐ" ItemStyle-HorizontalAlign="Left" />
                                
                                
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" Font-Bold="True" HorizontalAlign="Right" />
                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" Height="30px" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle BackColor="White" ForeColor="#000066" Height="30px" />
                            <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
                        </asp:GridView>
                    </div>
                    <div style="margin: 5px;">
                        <asp:Button ID="btnFirst" runat="server" Text="Đầu" CssClass="btn btn-primary" 
                            onclick="btnFirst_Click" />
                        <asp:Button ID="btnPre" runat="server" Style="margin-left: 5px;" Text="Trước" 
                            CssClass="btn btn-primary" onclick="btnPre_Click"/>
                        <asp:Button ID="btnNext" runat="server" Style="margin-left: 5px;" Text="Sau" 
                            CssClass="btn btn-warning" onclick="btnNext_Click"
                             />
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnSave" />
        </Triggers>
    </asp:UpdatePanel>

</asp:Content>

